﻿@model ProjectSupervisionViewModel
@{
    ViewBag.Title = "选择总监办弹出框";
    Layout = null;
}
<script type="text/javascript">
    $(document).ready(function () {
        $("select[name='numPerPage']").val(@ViewBag.numPerPage);
    });
    function PerChange(obj) {
        $("input[name='numPerPage']").val($(obj).val());
        dwzPageBreak({ targetType: 'dialog', numPerPage: $(obj).val() });

    }
</script>

<div class="pageHeader">
    <form action="@Url.Action("SplitPage", "ProjectSupervision")" method="post" id="pagerForm" onsubmit="return dwzSearch(this, 'dialog');">
        <input type="hidden" name="uId" value="@ViewBag.uId" />
        <input type="hidden" name="uName" value="@ViewBag.uName" />
        <input type="hidden" name="uSection" value="@ViewBag.uSection" />
        <input type="hidden" name="pageNum" value="1" />
        <input type="hidden" name="numPerPage" value="@(ViewBag.numPerPage)" />
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label>总监办:</label>
                    <input class="textInput" name="iput_deName" value="@(ViewBag.iput_deName)" type="text" >
                </li>
                <li>
                  <button type="submit" class="btn btn-success btn-xs">搜索</button>
                </li>
            </ul>
        </div>
    </form>
</div>
<div class="pageContent" style="text-align:center;">
    <table class="table" layouth="90" targettype="dialog" width="100%">
        <thead>
            <tr>
                <th>标段</th>
                <th>总监办</th>
                <th width="80">选择</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var info in Model.ProjectSupervisionList)
            { 
                <tr>
                    <td>@info.SUPERVISION_CODE</td>
                    <td>@info.SUPERVISION_DEPARTNAME</td>
                    <td>
                        <a class="btnSelect" href="javascript:MyBringBack({@ViewBag.uId:'@info.SUPERVISION_DEPARTID', @ViewBag.uName:'@info.SUPERVISION_DEPARTNAME', @ViewBag.uSection:'@info.SUPERVISION_CODE'})" title="选择">选择</a>
                    </td>
                </tr>
            }
        </tbody>
    </table>

    <div class="panelBar">
        <div class="pages">
            <span>每页</span>

            <select name="numPerPage" onchange="PerChange(this)">
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="50">50</option>
            </select>
            <span>条，共@(ViewBag.pagenumshown)页,@(ViewBag.totalcount)条</span>
        </div>
        <div class="pagination" targetType="dialog" totalCount="@(ViewBag.totalcount)" numPerPage="@(ViewBag.numPerPage)" pageNumShown="10" currentPage="@(ViewBag.pageNum)"></div>
    </div>
</div>
<script type="text/javascript">
    function MyBringBack(obj) {
        $.each(obj, function (key, val) {
            $("#" + key).val(val);
        });
        $.bringBack();
    }
</script>